#!/bin/bash
echo "makefile..."
make
make clean


if [ x$1 == x ]
then
    echo "NO PARAMS INPUT!"
    rm ./test
    exit 0
fi
# Config Setting
SPARE=$1 # interger limited

if [[ $SPARE -lt 1 ]];
then
echo "Input Error!"
exit 0
fi

# test
echo "test, generate result and figure..."
./test $SPARE
python plot.py

echo "SUCCESS"
# clean
rm ./test

exit 0
